package com.jr.util;

import java.util.ArrayList;

public class PageHelper {

    private Integer dateCount;//查询数据的总条数：
    private Integer showNumber=5;//每页显示的条数
    private Integer pageCount;//参与分页的总页数
    private Integer pageIndex=1;//当前是第几页
    private ArrayList listIndex;//显示当前页的集合数据

    public Integer getDateCount() {
        return dateCount;
    }

    public void setDateCount(Integer dateCount) {
        this.dateCount = dateCount;
        getPageCount();
    }

    public Integer getShowNumber() {
        return showNumber;
    }

  /*  public void setShowNumber(Integer showNumber) {
        this.showNumber = showNumber;
    }*/

    public Integer getPageCount() {
        pageCount=this.dateCount%this.showNumber==0?
                this.dateCount/this.showNumber:
                this.dateCount/this.showNumber+1;
        return pageCount;
    }

   /* public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }*/

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public ArrayList getListIndex() {
        return listIndex;
    }

    public void setListIndex(ArrayList listIndex) {
        this.listIndex = listIndex;
    }
}
